home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20030409-20031118 / 000404_anthonypieper@cs.com_Mon Nov 10 10:25:12 2003.msg < prev    next >
Internet Message Format  |  2020-01-01  |  3KB

  1. Path: newsmaster.cc.columbia.edu!panix!news.maxwell.syr.edu!postnews1.google.com!not-for-mail
  2. From: anthonypieper@cs.com (newexpectuser)
  3. Newsgroups: comp.protocols.kermit.misc
  4. Subject: Re: Problem with Kermit spawned from Expect script sending files
  5. Date: 10 Nov 2003 05:37:19 -0800
  6. Organization: http://groups.google.com
  7. Lines: 45
  8. Message-ID: <f0bb0f39.0311100537.7a4d4faf@posting.google.com>
  9. References: <f0bb0f39.0311061216.1ba040a0@posting.google.com> <slrnbqlcid.ooo.fdc@sesame.cc.columbia.edu> <f0bb0f39.0311070527.6ce76ffc@posting.google.com> <slrnbqnbfm.380.fdc@sesame.cc.columbia.edu> <f0bb0f39.0311070946.62574f98@posting.google.com> <slrnbqns98.69r.fdc@sesame.cc.columbia.edu> <slrnbqnsgg.856.fdc@sesame.cc.columbia.edu>
  10. NNTP-Posting-Host: 209.251.39.194
  11. Content-Type: text/plain; charset=ISO-8859-1
  12. Content-Transfer-Encoding: 8bit
  13. X-Trace: posting.google.com 1068471440 979 127.0.0.1 (10 Nov 2003 13:37:20 GMT)
  14. X-Complaints-To: groups-abuse@google.com
  15. NNTP-Posting-Date: Mon, 10 Nov 2003 13:37:20 +0000 (UTC)
  16. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14660
  17.  
  18. Frank da Cruz <fdc@columbia.edu> wrote in message news:<slrnbqnsgg.856.fdc@sesame.cc.columbia.edu>...
  19. > In article <slrnbqns98.69r.fdc@sesame.cc.columbia.edu>, Frank da Cruz wrote:
  20. > : In article <f0bb0f39.0311070946.62574f98@posting.google.com>,
  21. > : newexpectuser wrote:
  22. > :: I tried the /pty, but when I run it (via ./scriptname.sh), it puts me
  23. > :: at a "C-Kermit>" prompt ?
  24. > ::
  25. > : Here's a script that works for me:
  26. > : 
  27. > :   #!/usr/bin/kermit +
  28. > :   ;
  29. > :   ; Using OpenSSH_3.7.1p2...
  30. > :   ;
  31. > :   set host /pty ssh -e none -l \v(userid) \%1
  32. > :   if fail stop 1
  33. > :   input 20 password:
  34. > :   if success lineout \%2
  35. > : 
  36. > : In this script, \%1 is the hostname or address and \%2 is the password.
  37. > : 
  38. > : I suspect your script did not wait for the "password:" prompt and the
  39. > : ssh client does not allow typeahead.
  40. > : 
  41. > I forgot to add, in case it is not obvious, that the script will return
  42. > to the C-Kermit> when it has no more commands to execute, unless it
  43. > executes an EXIT or QUIT command.
  44. > The script fragment above, then, will return to the C-Kermit> prompt because
  45. > it has no more commands to execute.  Thus you must continue the script
  46. > to do whatever you want it to do, for example:
  47. >   (wait for shell prompt)
  48. >   lineout "kermit -x"     ; Start Kermit server
  49. >   rcd somedirectory       ; CD to some directory on the host
  50. I thought this command changed the directory on the remote system. I
  51. have most of this working (including connecting now), however once I
  52. get connected to the remote server, I want to change into a specific
  53. directory on the remote server and I tried the rcd and do a ls -ltr
  54. command, but it gives me my directory where I execute the script
  55. (local machine) ?
  56. >   send /delete somefile   ; "move" a file from here to there
  57. >   bye                     ; Shut down and log out the server
  58. >   exit                    ; Exit from local Kermit program
  59. > - Frank
  60.